import 'dart:convert';
import 'package:untitled/generated/json/base/json_field.dart';
import 'package:untitled/generated/json/res_entity.g.dart';

@JsonSerializable()
class ResEntity {

	late int code;
	late double latitude;
	late ResLocation location;
	late double longitude;
  
  ResEntity();

  factory ResEntity.fromJson(Map<String, dynamic> json) => $ResEntityFromJson(json);

  Map<String, dynamic> toJson() => $ResEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ResLocation {

	late String city;
	late String county;
	late String prov;
  
  ResLocation();

  factory ResLocation.fromJson(Map<String, dynamic> json) => $ResLocationFromJson(json);

  Map<String, dynamic> toJson() => $ResLocationToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}